#! /user/bin/python3
# coding-utf-8
# @Time = 2024/12/5 11:06
# @Author:Poolaris

class Loginbase:

    def login_input(self, input_placeholder):
        """
        登录用户名、密码输入框
        :param input_placeholder:
        :return:
        """
        return "//input[@placeholder='" + input_placeholder + "']"

    def login_button(self, button_name):
        """
        登录按钮
        :param button_name:
        :return:
        """
        return "//span[text()='" + button_name + "']/parent::button"

    def login_success(self):
        """
        登陆成功
        :return:
        """
        return "//p[text()='登录成功']"

    def need_choose_captcha(self):
        """
        验证码单选框
        :return:
        """
        return "//span[text()='是否需要验证码']/preceding-sibling::span/span"

    def captcha(self):
        """
        验证码
        :return:
        """
        return "//img[@class='el-image__inner']"

    def input_captcha(self):
        """
        输入验证码的输入框
        :return:
        """
        return "//input[@placeholder='请输入验证码']"


if __name__ == '__main__':
    print(Loginbase().login_input("密码"))
    print(Loginbase().login_button("登录"))
